home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.11 / hspascal-programme / graphdemo.p < prev    next >
Text File  |  1995-04-21  |  971b  |  54 lines

  1. Program Demo1;
  2.  
  3. Uses Graph, Crt, UtilUnit;
  4.  
  5. Var     Driver, Mode:     Integer;
  6.     t:            Integer;
  7.  
  8.  
  9.  
  10.  
  11. Procedure Wait;
  12. begin
  13. ASM
  14.     @L:    btst    #6, $BFE001
  15.         bne    @L
  16. End;
  17. End;
  18.  
  19.  
  20.  
  21. begin
  22.     Driver:=DETECT;
  23.     InitGraph(Driver, Mode, '');
  24.     SetColor(1);
  25.     t:=0;
  26.     MoveTo(10,10);
  27.     OutText(' ---   Bitte eine Taste drücken ---');
  28.     Repeat
  29.         t:=t+1;
  30.         SetColor(Random(GetMaxColor)+1);
  31.         Line(50,50,random(GetMaxX),random(GetMaxY));
  32.         if t=10 then begin
  33.             t:=0;
  34.             SetColor(1);
  35.             MoveTo(10,10);
  36.             OutText(' ---   Bitte eine Taste drücken ---');
  37.             end;
  38.     Until KeyPressed;
  39.     SetColor(0);
  40.     MoveTo(10,10);
  41.     OutText(' ---   Bitte eine Taste drücken ---');
  42.     SetColor(1);
  43.     MoveTo(50,50);
  44.     OutText(' Wir befinden uns in Modus Nr.'+Int2Str(Driver));
  45.     MoveTo(50,70);
  46.     OutText(' Die Anzahl der Farben ist '+Int2Str(GetMaxColor));
  47.     MoveTo(50,90);
  48.     OutText(' Die Auflösung ist '+Int2Str(GetMaxX)+'x'+Int2Str(GetMaxY));
  49.     MoveTo(50,120);
  50.     OutText(' Bitte die linke Maustaste drücken !!');
  51.     Wait;
  52.     
  53.     CloseGraph;
  54. end.